package com.sensen.service;

import com.sensen.model.ProductInventory;

/**
 * Created by Administrator on 2017/10/3.
 */
public class ProductInventoryService {

    /**
     * 根据商品id查询商品库存
     * @param productId 商品id
     * @return 商品库存
     */
    public ProductInventory findProductInventory(Integer productId) {
       // return productInventoryMapper.findProductInventory(productId);
        return null;
    }

    /**
     * 设置商品库存的缓存
     * @param productInventory 商品库存
     */
    public void setProductInventoryCache(ProductInventory productInventory) {
        String key = "product:inventory:" + productInventory.getProductId();
        //redisDAO.set(key, String.valueOf(productInventory.getInventoryCnt()));
    }
}
